// use wasm_bindgen::prelude::*;
// use web_sys::HtmlElement;
//
// #[wasm_bindgen]
// extern "C" {
//     #[wasm_bindgen(js_name = bootstrap)]
//     pub type Bootstrap;
//
//     #[wasm_bindgen(js_namespace = bootstrap, static_method_of = Bootstrap)]
//     pub fn Modal(element: &HtmlElement) -> ModalInstance;
//
//     pub type ModalInstance;
//     #[wasm_bindgen(method, js_class = "Modal")]
//     pub fn hide(this: &ModalInstance);
// }

use wasm_bindgen::prelude::*;
use web_sys::Element;

#[wasm_bindgen]
extern "C" {
    #[derive(Debug)]
    pub type BootstrapModal;

    #[wasm_bindgen(constructor, js_namespace = bootstrap)]
    pub fn new(element: &Element) -> BootstrapModal;

    #[wasm_bindgen(method, js_class="Modal")]
    pub fn show(this: &BootstrapModal);

    #[wasm_bindgen(method, js_class="Modal")]
    pub fn hide(this: &BootstrapModal);
}